package android07.newtop.holder;

import android.text.TextUtils;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.jude.easyrecyclerview.adapter.BaseViewHolder;

import android07.newtop.R;
import android07.newtop.model.ApiService;
import android07.newtop.model.bean.PictureGallery;
import android07.newtop.utils.GlideUtil;


/**
 * Created by hy on 2016.8.13
 */
public class PictureGalleryHolder extends BaseViewHolder<PictureGallery.TngouBean> {


    public ImageView iv_pic;
    public TextView tv_title;
    public TextView tv_duration;


    public PictureGalleryHolder(ViewGroup parent) {
        super(parent, R.layout.picture_gallery_item);
        iv_pic = $(R.id.iv_pic);
        tv_title = $(R.id.tv_title);
        tv_duration = $(R.id.tv_duration);
    }

    @Override
    public void setData(PictureGallery.TngouBean data) {
        super.setData(data);


      //  tv_title.setText(data.getTitle());
       tv_duration.setText(data.getTitle());
        GlideUtil.setCircleImageUrl(ApiService.PICTURE_ROOT_LOADURL+data.getImg(),iv_pic,5);

    }


}
